<template>
    <div>
        <Action-sheet 
        v-model="show" 
        cancel-text="取消" 
        close-on-click-action
         @cancel="show = false">
            <div class="content">
                <div class="item border-bottom" v-for="(item,index) of list" :key="index" @click="handelSelect(item)">
                    <div class="imgBox">
                        <img :src="require('../../images/class1.png')">
                    </div>
                    <div class="name">{{item.gradeName}}{{item.className}}</div>
                </div>
            </div>
        </Action-sheet>
    </div>
</template>

<script>
import { ActionSheet } from 'vant';
export default {
    name:'classModal',
    components:{
        ActionSheet
    },
    data(){
        return {
            show:false
        }
    },
    computed: {
        list () {
            return this.$store.state.studentAppraise.classList;
        }
    },
    methods:{
        handelSelect(item){
            this.$emit('handelSelect',item)
        }
    }
}
</script>

<style lang="less" scoped>
.content{
    .item{
        display: flex;
        box-sizing: border-box;
        padding:0.2rem 0 0.2rem 0.4rem;
        .imgBox{
            width:0.7rem;
            height:0.7rem;
            margin-right:0.2rem;
            img{
                width:100%;
                height:100%;
            }
        }
        .name{
            flex: 1;
            line-height: 0.7rem;
            font-size:0.28rem;
            color:#333;
        }
    }
}
</style>


